package cn.ilikes.tools.nosql.jpa.clients.indexs.units;

import cn.ilikes.tools.nosql.jpa.clients.indexs.IClientIndex;
import cn.ilikes.tools.nosql.jpa.metadatas.EntityMetaData;

public class LuceneUtils {

	public static String entityCLassfield(EntityMetaData metadata) {
		String entityClazz = LuceneQueryUtils.toLowerCase(metadata.getEntityClazz().getCanonicalName());

		return entityClazz;
	}

	public static String indexEntityCLassfield(EntityMetaData metadata) {

		return IClientIndex.ENTITY_CLASS_FIELD + ":" + entityCLassfield(metadata);
	}

	public static String createLuceneFieldsNames(String entityIndexName, String indexName) {
		String luceneFieldsName = LuceneQueryUtils.createLuceneFieldsName(entityIndexName, indexName);
		return luceneFieldsName;
	}

}
